.class final Lcom/nbi/map/android/b;
.super Ljava/lang/Object;


# instance fields
.field private mContext:Landroid/content/Context;

.field tY:Lcom/nbi/map/android/MapView;

.field private yX:I

.field private yY:I

.field private yZ:I

.field za:Lcom/nbi/map/android/a;

.field zb:Lcom/nbi/map/android/a;

.field zc:Lcom/nbi/map/android/a;

.field zd:Lcom/nbi/map/android/a;

.field ze:Z


# direct methods
.method constructor <init>(Landroid/content/Context;Lcom/nbi/map/android/MapView;)V
    .locals 3

    const/high16 v2, 0x40e0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p2, p0, Lcom/nbi/map/android/b;->tY:Lcom/nbi/map/android/MapView;

    iput-object p1, p0, Lcom/nbi/map/android/b;->mContext:Landroid/content/Context;

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iget v0, v0, Landroid/util/DisplayMetrics;->density:F

    mul-float v1, v0, v2

    float-to-int v1, v1

    iput v1, p0, Lcom/nbi/map/android/b;->yX:I

    mul-float v1, v0, v2

    float-to-int v1, v1

    iput v1, p0, Lcom/nbi/map/android/b;->yY:I

    mul-float/2addr v0, v2

    float-to-int v0, v0

    iput v0, p0, Lcom/nbi/map/android/b;->yZ:I

    return-void
.end method

.method private a(Landroid/content/Context;Lcom/nbi/map/android/a;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/view/View$OnClickListener;)V
    .locals 9

    const/4 v8, 0x1

    const/4 v7, -0x2

    const/4 v6, 0x0

    iget-object v0, p0, Lcom/nbi/map/android/b;->tY:Lcom/nbi/map/android/MapView;

    invoke-virtual {v0}, Lcom/nbi/map/android/MapView;->kZ()Lcom/nbi/map/android/TileMapView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nbi/map/android/TileMapView;->aA()Lnbisdk/do;

    move-result-object v0

    invoke-virtual {v0, p3}, Lnbisdk/do;->j(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    new-instance v1, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-direct {v1, v2, v0}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/nbi/map/android/b;->tY:Lcom/nbi/map/android/MapView;

    invoke-virtual {v0}, Lcom/nbi/map/android/MapView;->kZ()Lcom/nbi/map/android/TileMapView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nbi/map/android/TileMapView;->aA()Lnbisdk/do;

    move-result-object v0

    invoke-virtual {v0, p4}, Lnbisdk/do;->j(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    new-instance v2, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-direct {v2, v3, v0}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/nbi/map/android/b;->tY:Lcom/nbi/map/android/MapView;

    invoke-virtual {v0}, Lcom/nbi/map/android/MapView;->kZ()Lcom/nbi/map/android/TileMapView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nbi/map/android/TileMapView;->aA()Lnbisdk/do;

    move-result-object v0

    invoke-virtual {v0, p5}, Lnbisdk/do;->j(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    new-instance v3, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-direct {v3, v4, v0}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V

    new-instance v0, Landroid/graphics/drawable/StateListDrawable;

    invoke-direct {v0}, Landroid/graphics/drawable/StateListDrawable;-><init>()V

    new-array v4, v8, [I

    const v5, 0x10100a7

    aput v5, v4, v6

    invoke-virtual {v0, v4, v1}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    new-array v1, v8, [I

    const v4, -0x101009e

    aput v4, v1, v6

    invoke-virtual {v0, v1, v2}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    new-array v1, v6, [I

    invoke-virtual {v0, v1, v3}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    invoke-virtual {p2, v0}, Lcom/nbi/map/android/a;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    invoke-virtual {p2, v3}, Lcom/nbi/map/android/a;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    invoke-virtual {p2, p6}, Lcom/nbi/map/android/a;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    new-instance v0, Landroid/view/ViewGroup$LayoutParams;

    invoke-direct {v0, v7, v7}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    invoke-virtual {p2, v0}, Lcom/nbi/map/android/a;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/nbi/map/android/b;->tY:Lcom/nbi/map/android/MapView;

    invoke-virtual {v0, p2}, Lcom/nbi/map/android/MapView;->addView(Landroid/view/View;)V

    return-void
.end method

.method static synthetic a(Lcom/nbi/map/android/b;)V
    .locals 0

    invoke-direct {p0}, Lcom/nbi/map/android/b;->kW()V

    return-void
.end method

.method static synthetic b(Lcom/nbi/map/android/b;)V
    .locals 0

    invoke-direct {p0}, Lcom/nbi/map/android/b;->kX()V

    return-void
.end method

.method private kW()V
    .locals 6

    const/4 v5, 0x1

    const/4 v4, 0x0

    iget-object v0, p0, Lcom/nbi/map/android/b;->tY:Lcom/nbi/map/android/MapView;

    invoke-virtual {v0}, Lcom/nbi/map/android/MapView;->kZ()Lcom/nbi/map/android/TileMapView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nbi/map/android/TileMapView;->getZoomLevel()I

    move-result v0

    invoke-static {}, Lnbisdk/ec;->dT()Lnbisdk/ec;

    move-result-object v1

    invoke-virtual {v1}, Lnbisdk/ec;->dX()I

    move-result v1

    invoke-static {}, Lnbisdk/ec;->dT()Lnbisdk/ec;

    move-result-object v2

    invoke-virtual {v2}, Lnbisdk/ec;->dW()I

    move-result v2

    iget-object v3, p0, Lcom/nbi/map/android/b;->zb:Lcom/nbi/map/android/a;

    if-ge v0, v1, :cond_0

    move v1, v5

    :goto_0
    invoke-virtual {v3, v1}, Lcom/nbi/map/android/a;->setEnabled(Z)V

    iget-object v1, p0, Lcom/nbi/map/android/b;->za:Lcom/nbi/map/android/a;

    if-le v0, v2, :cond_1

    move v0, v5

    :goto_1
    invoke-virtual {v1, v0}, Lcom/nbi/map/android/a;->setEnabled(Z)V

    return-void

    :cond_0
    move v1, v4

    goto :goto_0

    :cond_1
    move v0, v4

    goto :goto_1
.end method

.method private kX()V
    .locals 3

    const/16 v2, 0x8

    const/4 v1, 0x0

    iget-boolean v0, p0, Lcom/nbi/map/android/b;->ze:Z

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/nbi/map/android/b;->tY:Lcom/nbi/map/android/MapView;

    invoke-virtual {v0}, Lcom/nbi/map/android/MapView;->kZ()Lcom/nbi/map/android/TileMapView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nbi/map/android/TileMapView;->isTrafficLayerVisible()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/nbi/map/android/b;->zc:Lcom/nbi/map/android/a;

    invoke-virtual {v0, v2}, Lcom/nbi/map/android/a;->setVisibility(I)V

    iget-object v0, p0, Lcom/nbi/map/android/b;->zd:Lcom/nbi/map/android/a;

    invoke-virtual {v0, v1}, Lcom/nbi/map/android/a;->setVisibility(I)V

    goto :goto_0

    :cond_1
    iget-object v0, p0, Lcom/nbi/map/android/b;->zd:Lcom/nbi/map/android/a;

    invoke-virtual {v0, v2}, Lcom/nbi/map/android/a;->setVisibility(I)V

    iget-object v0, p0, Lcom/nbi/map/android/b;->zc:Lcom/nbi/map/android/a;

    invoke-virtual {v0, v1}, Lcom/nbi/map/android/a;->setVisibility(I)V

    goto :goto_0
.end method


# virtual methods
.method protected final i(II)V
    .locals 7

    const/4 v6, 0x1

    const/4 v5, 0x0

    iget v0, p0, Lcom/nbi/map/android/b;->yY:I

    sub-int v0, p1, v0

    iget v1, p0, Lcom/nbi/map/android/b;->yZ:I

    sub-int v1, p2, v1

    iget-object v2, p0, Lcom/nbi/map/android/b;->zb:Lcom/nbi/map/android/a;

    if-eqz v2, :cond_0

    iget-object v2, p0, Lcom/nbi/map/android/b;->zb:Lcom/nbi/map/android/a;

    invoke-virtual {v2}, Lcom/nbi/map/android/a;->getMeasuredWidth()I

    move-result v2

    sub-int v2, v0, v2

    iget-object v3, p0, Lcom/nbi/map/android/b;->zb:Lcom/nbi/map/android/a;

    invoke-virtual {v3}, Lcom/nbi/map/android/a;->getMeasuredHeight()I

    move-result v3

    sub-int v3, v1, v3

    iget-object v4, p0, Lcom/nbi/map/android/b;->zb:Lcom/nbi/map/android/a;

    invoke-virtual {v4, v2, v3, v0, v1}, Lcom/nbi/map/android/a;->layout(IIII)V

    move v0, v2

    :cond_0
    iget-object v2, p0, Lcom/nbi/map/android/b;->za:Lcom/nbi/map/android/a;

    if-eqz v2, :cond_1

    iget-object v2, p0, Lcom/nbi/map/android/b;->za:Lcom/nbi/map/android/a;

    invoke-virtual {v2}, Lcom/nbi/map/android/a;->getMeasuredWidth()I

    move-result v2

    sub-int v2, v0, v2

    iget-object v3, p0, Lcom/nbi/map/android/b;->za:Lcom/nbi/map/android/a;

    invoke-virtual {v3}, Lcom/nbi/map/android/a;->getMeasuredHeight()I

    move-result v3

    sub-int v3, v1, v3

    iget-object v4, p0, Lcom/nbi/map/android/b;->za:Lcom/nbi/map/android/a;

    invoke-virtual {v4, v2, v3, v0, v1}, Lcom/nbi/map/android/a;->layout(IIII)V

    move v0, v2

    :cond_1
    iget-object v2, p0, Lcom/nbi/map/android/b;->zc:Lcom/nbi/map/android/a;

    if-eqz v2, :cond_3

    iget-object v2, p0, Lcom/nbi/map/android/b;->zd:Lcom/nbi/map/android/a;

    if-eqz v2, :cond_3

    iget-object v2, p0, Lcom/nbi/map/android/b;->zb:Lcom/nbi/map/android/a;

    invoke-virtual {v2}, Lcom/nbi/map/android/a;->getVisibility()I

    move-result v2

    if-nez v2, :cond_4

    move v2, v6

    :goto_0
    iget-object v3, p0, Lcom/nbi/map/android/b;->za:Lcom/nbi/map/android/a;

    invoke-virtual {v3}, Lcom/nbi/map/android/a;->getVisibility()I

    move-result v3

    if-nez v3, :cond_5

    move v3, v6

    :goto_1
    if-nez v2, :cond_2

    if-eqz v3, :cond_6

    :cond_2
    move v2, v6

    :goto_2
    if-eqz v2, :cond_7

    iget v2, p0, Lcom/nbi/map/android/b;->yX:I

    sub-int/2addr v0, v2

    :goto_3
    iget-object v2, p0, Lcom/nbi/map/android/b;->zc:Lcom/nbi/map/android/a;

    invoke-virtual {v2}, Lcom/nbi/map/android/a;->getMeasuredWidth()I

    move-result v2

    sub-int v2, v0, v2

    iget-object v3, p0, Lcom/nbi/map/android/b;->zc:Lcom/nbi/map/android/a;

    invoke-virtual {v3}, Lcom/nbi/map/android/a;->getMeasuredHeight()I

    move-result v3

    sub-int v3, v1, v3

    iget-object v4, p0, Lcom/nbi/map/android/b;->zc:Lcom/nbi/map/android/a;

    invoke-virtual {v4, v2, v3, v0, v1}, Lcom/nbi/map/android/a;->layout(IIII)V

    iget-object v2, p0, Lcom/nbi/map/android/b;->zd:Lcom/nbi/map/android/a;

    invoke-virtual {v2}, Lcom/nbi/map/android/a;->getMeasuredWidth()I

    move-result v2

    sub-int v2, v0, v2

    iget-object v3, p0, Lcom/nbi/map/android/b;->zd:Lcom/nbi/map/android/a;

    invoke-virtual {v3}, Lcom/nbi/map/android/a;->getMeasuredHeight()I

    move-result v3

    sub-int v3, v1, v3

    iget-object v4, p0, Lcom/nbi/map/android/b;->zd:Lcom/nbi/map/android/a;

    invoke-virtual {v4, v2, v3, v0, v1}, Lcom/nbi/map/android/a;->layout(IIII)V

    :cond_3
    return-void

    :cond_4
    move v2, v5

    goto :goto_0

    :cond_5
    move v3, v5

    goto :goto_1

    :cond_6
    move v2, v5

    goto :goto_2

    :cond_7
    iget v0, p0, Lcom/nbi/map/android/b;->yY:I

    sub-int v0, p1, v0

    goto :goto_3
.end method

.method public final kV()V
    .locals 7

    iget-object v1, p0, Lcom/nbi/map/android/b;->mContext:Landroid/content/Context;

    iget-object v0, p0, Lcom/nbi/map/android/b;->za:Lcom/nbi/map/android/a;

    if-nez v0, :cond_0

    new-instance v0, Lcom/nbi/map/android/a;

    invoke-direct {v0, v1}, Lcom/nbi/map/android/a;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/nbi/map/android/b;->za:Lcom/nbi/map/android/a;

    iget-object v2, p0, Lcom/nbi/map/android/b;->za:Lcom/nbi/map/android/a;

    const-string v3, "zoomout_hot.png"

    const-string v4, "zoomout_disabled.png"

    const-string v5, "zoomout.png"

    new-instance v6, Lcom/nbi/map/android/b$3;

    invoke-direct {v6, p0}, Lcom/nbi/map/android/b$3;-><init>(Lcom/nbi/map/android/b;)V

    move-object v0, p0

    invoke-direct/range {v0 .. v6}, Lcom/nbi/map/android/b;->a(Landroid/content/Context;Lcom/nbi/map/android/a;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/view/View$OnClickListener;)V

    :cond_0
    iget-object v1, p0, Lcom/nbi/map/android/b;->mContext:Landroid/content/Context;

    iget-object v0, p0, Lcom/nbi/map/android/b;->zb:Lcom/nbi/map/android/a;

    if-nez v0, :cond_1

    new-instance v0, Lcom/nbi/map/android/a;

    invoke-direct {v0, v1}, Lcom/nbi/map/android/a;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/nbi/map/android/b;->zb:Lcom/nbi/map/android/a;

    iget-object v2, p0, Lcom/nbi/map/android/b;->zb:Lcom/nbi/map/android/a;

    const-string v3, "zoomin_hot.png"

    const-string v4, "zoomin_disabled.png"

    const-string v5, "zoomin.png"

    new-instance v6, Lcom/nbi/map/android/b$4;

    invoke-direct {v6, p0}, Lcom/nbi/map/android/b$4;-><init>(Lcom/nbi/map/android/b;)V

    move-object v0, p0

    invoke-direct/range {v0 .. v6}, Lcom/nbi/map/android/b;->a(Landroid/content/Context;Lcom/nbi/map/android/a;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/view/View$OnClickListener;)V

    :cond_1
    iget-object v1, p0, Lcom/nbi/map/android/b;->mContext:Landroid/content/Context;

    iget-object v0, p0, Lcom/nbi/map/android/b;->zc:Lcom/nbi/map/android/a;

    if-nez v0, :cond_2

    new-instance v0, Lcom/nbi/map/android/a;

    invoke-direct {v0, v1}, Lcom/nbi/map/android/a;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/nbi/map/android/b;->zc:Lcom/nbi/map/android/a;

    iget-object v2, p0, Lcom/nbi/map/android/b;->zc:Lcom/nbi/map/android/a;

    const-string v3, "traffic_hide_hot.png"

    const-string v4, "traffic_disabled.png"

    const-string v5, "traffic_hide.png"

    new-instance v6, Lcom/nbi/map/android/b$1;

    invoke-direct {v6, p0}, Lcom/nbi/map/android/b$1;-><init>(Lcom/nbi/map/android/b;)V

    move-object v0, p0

    invoke-direct/range {v0 .. v6}, Lcom/nbi/map/android/b;->a(Landroid/content/Context;Lcom/nbi/map/android/a;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/view/View$OnClickListener;)V

    :cond_2
    iget-object v1, p0, Lcom/nbi/map/android/b;->mContext:Landroid/content/Context;

    iget-object v0, p0, Lcom/nbi/map/android/b;->zd:Lcom/nbi/map/android/a;

    if-nez v0, :cond_3

    new-instance v0, Lcom/nbi/map/android/a;

    invoke-direct {v0, v1}, Lcom/nbi/map/android/a;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/nbi/map/android/b;->zd:Lcom/nbi/map/android/a;

    iget-object v2, p0, Lcom/nbi/map/android/b;->zd:Lcom/nbi/map/android/a;

    const-string v3, "traffic_hot.png"

    const-string v4, "traffic_disabled.png"

    const-string v5, "traffic_show.png"

    new-instance v6, Lcom/nbi/map/android/b$2;

    invoke-direct {v6, p0}, Lcom/nbi/map/android/b$2;-><init>(Lcom/nbi/map/android/b;)V

    move-object v0, p0

    invoke-direct/range {v0 .. v6}, Lcom/nbi/map/android/b;->a(Landroid/content/Context;Lcom/nbi/map/android/a;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/view/View$OnClickListener;)V

    :cond_3
    invoke-direct {p0}, Lcom/nbi/map/android/b;->kW()V

    invoke-direct {p0}, Lcom/nbi/map/android/b;->kX()V

    return-void
.end method

.method final kY()V
    .locals 0

    invoke-direct {p0}, Lcom/nbi/map/android/b;->kW()V

    invoke-direct {p0}, Lcom/nbi/map/android/b;->kX()V

    return-void
.end method
